﻿namespace _31_C_中的参数传递_默认参数_可变参数
{
    internal class Program
    {
        static void Main(string[] args)
        {
            Console.Title = "C#中的参数传递_默认参数_可变参数";

            string name = "张三";

            object[] objelist=new object[] {"fe","3" };
            showParams("张三", objelist);
            Console.ReadKey();
        }

        static void show(string name, string grade = "一年级", int age = 18)
        {
            Console.WriteLine($"name:{name} grade:{grade} age:{age}");
        }

        static void showParams(string name, params object[] objs)//可变参数 只能放最后一个
        {
            foreach(object obj in objs)
            {
                Console.WriteLine(obj);
            }
        }
    }
}
